package com.example.qny01.service.impl;

import com.example.qny01.mapper.StudentMapper;
import com.example.qny01.service.StudentService;
import org.springframework.stereotype.Service;
import qny01.pojo.Student;

import javax.annotation.Resource;
import java.util.List;

@Service
public class StudentImpl implements StudentService {
    @Resource
    private StudentMapper studentMapper;

    @Override
    public List<Student> selectAll() {
        return studentMapper.selectAll();
    }

    @Override
    public Student selectById(Integer id) {
        return studentMapper.selectById(id);
    }

    @Override
    public int insert(Student student) {
        return studentMapper.insert(student);
    }

    @Override
    public int delete(Integer id) {
        return studentMapper.delete(id);
    }

    @Override
    public int update(Student student) {
        return studentMapper.update(student);
    }
}
